<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
        }

        .oul {
            display: flex;
            text-align: center;
            line-height: 46px;
        }

        li {
            flex : 1;
        }

        .box {
            text-align: center;
            line-height: 200px;
            font-size: 26px;
        }

        .active {
            background-color: blue;
            color: #fff;
        }
    </style>
</head>
<body>
    <div id="app">
        <ul class="oul">
            <li v-for="( item , index ) in list" :class="index === count? 'active': '' " @click="changeIndex(index)">
                {{ item }}
            </li>
        </ul>

        <div class="box">
            {{ list[count] }}
        </div>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>

    <script>
        new Vue ({
            el : "#app" ,
            data : {
                count : 0 ,
                list : ["语文", "数学", "英语"]
            },
            methods : {
                changeIndex( index ){
                    this.count = index 
                    console.log( index );
                }
            }
        })
    </script>
</body>
</html>